const { optionalFieldRes } = require('./optionalFieldRes');

const fieldTypes = [];

for (let field of optionalFieldRes.data) {
  if (field.fieldType) {
    if(fieldTypes.indexOf(field.fieldType) < 0)
    fieldTypes.push(field.fieldType);
  }else{
    console.log(field)
  }
}

console.log(fieldTypes);
